package 内部类作业1;

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
import org.w3c.dom.ls.LSOutput;

public abstract class CA {
    public  abstract   void   h();
    public  void  eat(){
        class   CA1{
            private  int  id;
            void   f(){
                System.out.println("吃饭");
            }
        }
        System.out.println("吃饭");
        IA ia = new IA() {
            @Override
            public void drink() {
                System.out.println("喝水");
            }

            @Override
            public void say() {
                System.out.println("说话");
            }
        };
        ia.say();
        ia.drink();
    }
    public   void    f(){
        new CA(){
            @Override
            public void h() {
                System.out.println("这是H方法，是CA的子类的H方法");
            }
        }.h();
    }

}
